﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="~show.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="ID" DataSourceID="AccessDataSource1" EmptyDataText="没有可显示的数据记录。">
            <Columns>
                <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True" 
                    SortExpression="ID" />
                <asp:BoundField DataField="ScientificName" HeaderText="ScientificName" 
                    SortExpression="ScientificName" />
                <asp:BoundField DataField="ChineseName" HeaderText="ChineseName" 
                    SortExpression="ChineseName" />
                <asp:BoundField DataField="CommonName" HeaderText="CommonName" 
                    SortExpression="CommonName" />
                <asp:BoundField DataField="FlowerColor" HeaderText="FlowerColor" 
                    SortExpression="FlowerColor" />
                <asp:BoundField DataField="FlowerStyle" HeaderText="FlowerStyle" 
                    SortExpression="FlowerStyle" />
                <asp:BoundField DataField="FlowerSize" HeaderText="FlowerSize" 
                    SortExpression="FlowerSize" />
                <asp:BoundField DataField="LeafStyle" HeaderText="LeafStyle" 
                    SortExpression="LeafStyle" />
                <asp:BoundField DataField="Height" HeaderText="Height" 
                    SortExpression="Height" />
                <asp:BoundField DataField="PopIntro" HeaderText="PopIntro" 
                    SortExpression="PopIntro" />
            </Columns>
        </asp:GridView>
        <asp:AccessDataSource ID="AccessDataSource1" runat="server" 
            DataFile="App_Data\MainDB.mdb" DeleteCommand="DELETE FROM `Species` WHERE `ID` = ?" 
            InsertCommand="INSERT INTO `Species` (`ID`, `ScientificName`, `ChineseName`, `CommonName`, `FlowerColor`, `FlowerStyle`, `FlowerSize`, `LeafStyle`, `Height`, `PopIntro`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" 
            SelectCommand="SELECT `ID`, `ScientificName`, `ChineseName`, `CommonName`, `FlowerColor`, `FlowerStyle`, `FlowerSize`, `LeafStyle`, `Height`, `PopIntro` FROM `Species`" 
            UpdateCommand="UPDATE `Species` SET `ScientificName` = ?, `ChineseName` = ?, `CommonName` = ?, `FlowerColor` = ?, `FlowerStyle` = ?, `FlowerSize` = ?, `LeafStyle` = ?, `Height` = ?, `PopIntro` = ? WHERE `ID` = ?">
            <DeleteParameters>
                <asp:Parameter Name="ID" Type="Int32" />
            </DeleteParameters>
            <InsertParameters>
                <asp:Parameter Name="ID" Type="Int32" />
                <asp:Parameter Name="ScientificName" Type="String" />
                <asp:Parameter Name="ChineseName" Type="String" />
                <asp:Parameter Name="CommonName" Type="String" />
                <asp:Parameter Name="FlowerColor" Type="Int32" />
                <asp:Parameter Name="FlowerStyle" Type="Int32" />
                <asp:Parameter Name="FlowerSize" Type="Int32" />
                <asp:Parameter Name="LeafStyle" Type="Int32" />
                <asp:Parameter Name="Height" Type="Int32" />
                <asp:Parameter Name="PopIntro" Type="String" />
            </InsertParameters>
            <UpdateParameters>
                <asp:Parameter Name="ScientificName" Type="String" />
                <asp:Parameter Name="ChineseName" Type="String" />
                <asp:Parameter Name="CommonName" Type="String" />
                <asp:Parameter Name="FlowerColor" Type="Int32" />
                <asp:Parameter Name="FlowerStyle" Type="Int32" />
                <asp:Parameter Name="FlowerSize" Type="Int32" />
                <asp:Parameter Name="LeafStyle" Type="Int32" />
                <asp:Parameter Name="Height" Type="Int32" />
                <asp:Parameter Name="PopIntro" Type="String" />
                <asp:Parameter Name="ID" Type="Int32" />
            </UpdateParameters>
        </asp:AccessDataSource>
    
    </div>
    </form>
</body>
</html>
